//
//  IMOSLoginLauncher.h
//  IMSecurity
//
//  Created by 张繁 on 2020/4/9.
//  Copyright © 2020 IF. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface IMOSLoginLauncher : NSObject

/**
 初始化，单独初始化token对象时调用，尽量不要使用init进行初始化
 
 @param user 用户名
 @return token对象
 */
- (instancetype)initWithUser:(NSString *)user;


/**
 获取当前设备已绑定PC列表
 
 @param completeBlock 完成后执行block
 */
- (void)getBindPcListWithCompleteBlock:(void(^)(int resultCode, NSArray* pcListData))completeBlock;

/**
 上传新的push id
 
 @param pushid 当前app的push id
 @param completeBlock 完成后执行block
 */
- (void)uploadPushID:(NSString*)pushid completionBlock:(void(^)(int resultCode))completeBlock;

/**
 获取windows密码
 @params pcID PC ID
 @param completeBlock 完成后执行block（返回包含简单密码和复杂密码）
 */
- (void)obtailPcPwdWithPCID:(NSString *)pcID completeBlock:(void(^)(int resultCode, NSString* dataPwd1, NSString* dataPwd2))completeBlock;


/// 绑定PC设备
/// @param PCName PC用户名
/// @param PCIMEI PC设备号
/// @param bindCode 绑定码
- (void)bindPCWithPCName:(NSString *)PCName
                  PCIMEI:(NSString *)PCIMEI
                bindCode:(NSString *)bindCode
       withCompleteBlock:(void(^)(int resultCode))completeBlock;


/// 扫码登录PC
/// @param PIN 当前用户证书PIN码
/// @param QRString PC端二维码数据
/// @param mode 签名模式
/// @param completeBlock 完成后执行block
- (void)loginPCByQRCodeWithPIN:(NSString *)PIN
                      QRString:(NSString *)QRString
                          mode:(SignMode)mode
              andCompleteBlock:(void(^)(int resultCode))completeBlock;


+ (NSString*)deriveKeyFromPlain:(NSString *)strPlain retSize:(const int)retSize;

- (void)getUserLoginLogWithPCIMEI:(NSString *)PCIMEI CompleteBlock:(void(^)(int resultCode,NSArray *arrLogs))completeBlock;
@end

NS_ASSUME_NONNULL_END
